ObjectsCompat

open class ObjectsCompat(source)

This class consists of static utility methods for operating on objects.

Functions

Link copied to clipboard
open fun equals(@Nullable a: Any, @Nullable b: Any): Boolean
Returns true if the arguments are equal to each other and false otherwise.
Link copied to clipboard
open fun hash(@Nullable values: Array<Any>): Int
Generates a hash code for a sequence of input values.
Link copied to clipboard
open fun hashCode(@Nullable o: Any): Int
Returns the hash code of a non-null argument and 0 for a null argument.
Link copied to clipboard
open fun <T> requireNonNull(@Nullable obj: T): T
Checks that the specified object reference is not null.
open fun <T> requireNonNull(@Nullable obj: T, @NonNull message: String): T
Checks that the specified object reference is not null and throws a customized NullPointerException if it is.
Link copied to clipboard
open fun toString(@Nullable o: Any, @Nullable nullDefault: String): String
Returns the result of calling toString on the first argument if the first argument is not null and returns the second argument otherwise.